package com.htthorizon.model.mapper;

import cn.hutool.core.date.DateTime;
import com.github.pagehelper.Page;
import com.htthorizon.model.domain.ModelMessage;
import com.htthorizon.model.request.ModelMessageSearchReq;
import com.htthorizon.model.response.ModelMessageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Brilliant
* @description 针对表【model_message(模型消息)】的数据库操作Mapper
* @createDate 2023-11-30 14:42:09
* @Entity com.htthorizon.model.domain.ModelMessage
*/
@Mapper
public interface ModelMessageMapper {

    int deleteByPrimaryKey(Long id);

    Long insert(ModelMessage record);

    int insertSelective(ModelMessage record);

    ModelMessage selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ModelMessage record);

    int updateByPrimaryKey(ModelMessage record);

    List<ModelMessageVo> getAllList(@Param("search") ModelMessageSearchReq search);

    int count(@Param("search")ModelMessageSearchReq search);

    ModelMessage findById(Long id);

    List<ModelMessageVo> getMyList(@Param("myId")Long myId);

    int updateByID(ModelMessage modelMessage);

    ModelMessage getById(Long id);
    ModelMessage getById2(@Param("id")Long id,@Param("search") ModelMessageSearchReq search);

    int delByID(Long id);



    List<ModelMessage> getMy(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("list1")List<Long> list1,@Param("search") ModelMessageSearchReq search);

    List<ModelMessage> getPages(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("search") ModelMessageSearchReq search);

    List<ModelMessage> selectByTimeLimit(@Param("date")DateTime date, @Param("lastMonth")DateTime lastMonth);
}
